package com.zhuxi.service.impl;

import com.zhuxi.service.DubboService;
import org.apache.dubbo.config.annotation.Service;

@Service
public class DubboServiceImpl implements DubboService {
    @Override
    public void methodA() throws InterruptedException {
        int num=(int)(Math.random()*101);
        Thread.sleep(num);
        System.out.println("方法A休眠了"+num+"毫秒");
    }

    @Override
    public void methodB() throws InterruptedException {
        int num=(int)(Math.random()*101);
        Thread.sleep(num);
        System.out.println("方法B休眠了"+num+"毫秒");
    }

    @Override
    public void methodC() throws InterruptedException {
        int num=(int)(Math.random()*101);
        Thread.sleep(num);
        System.out.println("方法C休眠了"+num+"毫秒");
    }
}
